package com.terrace.web.tagext.easyui.model;

import java.io.Serializable;

import com.terrace.web.constant.IconConstant;
import com.terrace.web.tagext.easyui.GridToolBarTag;

/**
 * 表格工具条对象
 * 
 * @author jiangyg
 *
 */
public class GridToolBar implements Serializable {

	private static final long serialVersionUID = 1735750857564035046L;

	/**
	 * 工具条选项URL
	 */
	private String url;

	/**
	 * 工具条选项标题
	 */
	private String title;

	/**
	 * 工具条选项自定义函数
	 */
	private String funname;

	/**
	 * 图标
	 */
	protected String iconCls;

	/**
	 * 工具条选项onclick事件
	 */
	private String onclick;

	/**
	 * 弹出框宽度
	 */
	private String width;

	/**
	 * 弹出框高度
	 */
	private String height;

	/**
	 * 权限编码
	 */
	private String permiCode;

	public GridToolBar() {
		super();
	}
	
	public GridToolBar(GridToolBarTag tag) {
		this.url = tag.getUrl();
		this.title = tag.getTitle();
		this.funname = tag.getFunname();
		this.onclick = tag.getOnclick();
		this.width = tag.getWidth();
		this.height = tag.getHeight();
		this.permiCode = tag.getPermiCode();
		this.iconCls = IconConstant.obtainIconClass(tag.getIconCls());
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getFunname() {
		return funname;
	}

	public void setFunname(String funname) {
		this.funname = funname;
	}

	public String getIconCls() {
		return iconCls;
	}

	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}

	public String getOnclick() {
		return onclick;
	}

	public void setOnclick(String onclick) {
		this.onclick = onclick;
	}

	public String getWidth() {
		return width;
	}

	public void setWidth(String width) {
		this.width = width;
	}

	public String getHeight() {
		return height;
	}

	public void setHeight(String height) {
		this.height = height;
	}

	public String getPermiCode() {
		return permiCode;
	}

	public void setPermiCode(String permiCode) {
		this.permiCode = permiCode;
	}

}
